home *** CD-ROM | disk | FTP | other *** search
/ Champak 61 / Volume 61 - JOGO DISK .iso / Games / fruit_cake_decoration.swf / scripts / DefineSprite_578 / frame_1 / DoAction.as
Text File  |  2008-03-12  |  1KB  |  58 lines

  1. stop();
  2. _root.d16_over = "off";
  3. x = this._xscale;
  4. y = this._yscale;
  5. vx = 0;
  6. vy = 0;
  7. a = 2;
  8. b = 2;
  9. this.onEnterFrame = function()
  10. {
  11.    vx = (vx + (targetx - x) / a) / b;
  12.    vy = (vy + (targety - y) / a) / b;
  13.    x += vx;
  14.    y += vy;
  15.    this._xscale = x;
  16.    this._yscale = y;
  17.    if(_root.d16_over == "off")
  18.    {
  19.       targetx = 70;
  20.       targety = 70;
  21.    }
  22.    this.onRollOver = function()
  23.    {
  24.       _root.eps3_sound.start();
  25.       _root.d16_over = "on";
  26.       targetx = 100;
  27.       targety = 100;
  28.    };
  29.    this.onRollOut = function()
  30.    {
  31.       targetx = 70;
  32.       targety = 70;
  33.    };
  34. };
  35. this.onPress = function()
  36. {
  37.    _root.eps1_sound.start();
  38.    _root.level = _root.level + 1;
  39.    _root.count16 = _root.count16 + 1;
  40.    _root.createEmptyMovieClip("dec16_" + _root.count16 + "_mc",_root.level);
  41.    _root.attachMovie("dec16_link","dec16_" + _root.count16 + "_mc",_root.level);
  42.    _root["dec16_" + _root.count16 + "_mc"].startDrag();
  43.    _root["dec16_" + _root.count16 + "_mc"]._x = 624;
  44.    _root["dec16_" + _root.count16 + "_mc"]._y = 137;
  45.    this.onRelease = function()
  46.    {
  47.       _root.eps2_sound.start();
  48.       _root["dec16_" + _root.count16 + "_mc"].stopDrag();
  49.    };
  50.    this.onReleaseOutside = function()
  51.    {
  52.       _root.eps2_sound.start();
  53.       targetx = 70;
  54.       targety = 70;
  55.       _root["dec16_" + _root.count16 + "_mc"].stopDrag();
  56.    };
  57. };
  58.